import { notification } from 'ant-design-vue';

interface NotificationParams {
    title?: string;
    type?: '' | 'success' | 'warning' | 'info' | 'error';
    position?: 'topRight' | 'topLeft' | 'bottomRight' | 'bottomLeft';
}

// 通知
export const notify = (message = '', params = {} as NotificationParams) => {
    notification[params.type || 'warning']({
        message,
        description: params.title || '',
        placement: params.position || 'topRight',
    });

}